CREATE TABLE [dbo].[TDCANJ_CL02]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[CO_CLIE] [dbo].[TD_VC_020] NOT NULL,
[NU_CANJ] [dbo].[TD_VC_008] NOT NULL,
[FE_CANJ] [dbo].[TD_DT_001] NOT NULL,
[NU_SECU_CANJ] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCANJ_CL__NU_SE__33F4B129] DEFAULT ((0)),
[NU_LETR_CLIE] [dbo].[TD_VC_020] NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NULL,
[NU_DOCU_CLIE] [dbo].[TD_VC_020] NULL,
[NU_ORDE_LETR] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TDCANJ_CL__NU_OR__34E8D562] DEFAULT ((0)),
[IM_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCANJ_CL__IM_DO__35DCF99B] DEFAULT ((0)),
[IM_SALD_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCANJ_CL__IM_SA__36D11DD4] DEFAULT ((0)),
[IM_SALD_CONV] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCANJ_CL__IM_SA__37C5420D] DEFAULT ((0)),
[IM_DETA] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCANJ_CL__IM_DE__38B96646] DEFAULT ((0)),
[IM_DETA_NEGA] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCANJ_CL__IM_DE__39AD8A7F] DEFAULT ((0)),
[IM_CONV_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCANJ_CL__IM_CO__3AA1AEB8] DEFAULT ((0)),
[ST_CIER_DOCU] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TDCANJ_CL__ST_CI__3B95D2F1] DEFAULT ('N'),
[IM_CANJ_MDOC] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCANJ_CL__IM_CA__3D7E1B63] DEFAULT ((0)),
[IM_CANJ_MCAN] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCANJ_CL__IM_CA__3E723F9C] DEFAULT ((0)),
[CO_ESTA_ORIG] [dbo].[TD_VC_003] NULL,
[ST_NDEB_AUTO] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TDCANJ_CL__ST_ND__3F6663D5] DEFAULT ('N'),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCANJ_CL__CO_US__414EAC47] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCANJ_CL__FE_US__4242D080] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCANJ_CL__CO_US__4336F4B9] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCANJ_CL__FE_US__442B18F2] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCANJ_CL02] WITH NOCHECK ADD CONSTRAINT [CK__TDCANJ_CL__ST_CI__3C89F72A] CHECK NOT FOR REPLICATION (([ST_CIER_DOCU]='N' OR [ST_CIER_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDCANJ_CL02] WITH NOCHECK ADD CONSTRAINT [CK__TDCANJ_CL__ST_ND__405A880E] CHECK NOT FOR REPLICATION (([ST_NDEB_AUTO]='N' OR [ST_NDEB_AUTO]='S'))
GO
ALTER TABLE [dbo].[TDCANJ_CL02] ADD CONSTRAINT [PK__TDCANJ_C__07789D37076CEECC] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [CO_CLIE], [NU_CANJ], [FE_CANJ], [NU_SECU_CANJ]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCANJ_CL02] ADD CONSTRAINT [FK__TDCANJ_CL02__3059F5C6] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [CO_CLIE], [NU_CANJ], [FE_CANJ]) REFERENCES [dbo].[TCCANJ_CL02] ([CO_EMPR], [CO_UNID_CONC], [CO_CLIE], [NU_CANJ], [FE_CANJ])
GO
